import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/components/login'
import Register from '@/components/register'
import UserInfo from '@/components/userInfo'
import EditeUserInfo from '@/components/editUserInfo'
import MyFollow from '@/components/myFollow'
import MyCollection from '@/components/myCollection'
import MyComment from '@/components/myComment'
import MySearch from '@/components/mySearch'
import NewsDetail from '@/components/newsDetail'
import ColumnManag from '@/components/columnManag'
import Index from '@/components/index'
import Test from '@/components/test/test'
import MoreFollow from '@/components/moreFollow'

Vue.use(VueRouter)

export default new VueRouter({
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      component: Login
    },
    {
      path: '/register',
      component: Register
    },
    {
      path: '/userinfo',
      component: UserInfo
    },
    {
      path: '/editUserInfo',
      component: EditeUserInfo
    },
    {
      path: '/myfollow',
      component: MyFollow
    },
    {
      path: '/mycollection',
      component: MyCollection
    },
    {
      path: '/mycomment',
      component: MyComment
    },
    {
      path: '/mysearch',
      component: MySearch
    },
    {
      path: '/newsDetail/:id',
      name: 'newsDetail',
      component: NewsDetail
    },
    {
      path: '/columnmanag',
      component: ColumnManag
    },
    {
      path: '/index',
      component: Index
    },
    {
      path: '/test',
      component: Test
    },
    {
      path: '/morefollow/:id',
      name: 'moreFollow',
      component: MoreFollow
    }
  ]
})
